import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import {h} from 'vue';
import {Switch} from 'ant-design-vue';

export const columns: BasicColumn[] = [
        {
            title: '接口编码',
            dataIndex: 'apiCode',
            width: 200,
        },
        {
            title: '接口名称',
            dataIndex: 'apiName',
            width: 200,
        },
        {
            title: '接口分类:default-默认分类',
            dataIndex: 'apiCategory',
            width: 200,
        },
        {
            title: '资源描述',
            dataIndex: 'apiDesc',
            width: 200,
        },
        {
            title: '请求方式',
            dataIndex: 'requestMethod',
            width: 200,
        },
        {
            title: '响应类型',
            dataIndex: 'contentType',
            width: 200,
        },
        {
            title: '服务ID',
            dataIndex: 'serviceId',
            width: 200,
        },
        {
            title: '请求路径',
            dataIndex: 'path',
            width: 200,
        },
        {
            title: '优先级',
            dataIndex: 'priority',
            width: 200,
        },
        {
            title: '状态:0-无效 1-有效',
            dataIndex: 'status',
            width: 200,
        },
        {
            title: '创建时间',
            dataIndex: 'createTime',
            width: 200,
        },
        {
            title: '更新时间',
            dataIndex: 'updateTime',
            width: 200,
        },
        {
            title: '保留数据0-否 1-是 不允许删除',
            dataIndex: 'isPersist',
            width: 200,
        },
        {
            title: '是否需要认证: 0-无认证 1-身份认证 默认:1',
            dataIndex: 'isAuth',
            width: 200,
        },
        {
            title: '是否公开: 0-内部的 1-公开的',
            dataIndex: 'isOpen',
            width: 200,
        },
        {
            title: '类名',
            dataIndex: 'className',
            width: 200,
        },
        {
            title: '按钮名称',
            dataIndex: 'actionName',
            width: 200,
        },
        {
            title: '菜单名称',
            dataIndex: 'menuName',
            width: 200,
        },
        {
            title: '方法名',
            dataIndex: 'methodName',
            width: 200,
        },
        {
            title: '请求参数配置',
            dataIndex: 'requestParamCfg',
            width: 200,
        },
        {
            title: '响应数据配置',
            dataIndex: 'responseParamCfg',
            width: 200,
        },
        {
            title: '请求参数',
            dataIndex: 'requestParam',
            width: 200,
        },
        {
            title: '响应参数',
            dataIndex: 'responseParam',
            width: 200,
        },
];

export const searchFormSchema: FormSchema[] = [
];

export const formSchema: FormSchema[] = [
        {
            label: '接口编码',
            field: 'apiCode',
            component: 'Input',
            required: true,
        },
        {
            label: '接口名称',
            field: 'apiName',
            component: 'Input',
            required: true,
        },
        {
            label: '接口分类:default-默认分类',
            field: 'apiCategory',
            component: 'Input',
            required: true,
        },
        {
            label: '资源描述',
            field: 'apiDesc',
            component: 'Input',
            required: true,
        },
        {
            label: '请求方式',
            field: 'requestMethod',
            component: 'Input',
            required: true,
        },
        {
            label: '响应类型',
            field: 'contentType',
            component: 'Input',
            required: true,
        },
        {
            label: '服务ID',
            field: 'serviceId',
            component: 'Input',
            required: true,
        },
        {
            label: '请求路径',
            field: 'path',
            component: 'Input',
            required: true,
        },
        {
            label: '优先级',
            field: 'priority',
            component: 'Input',
            required: true,
        },
        {
            label: '状态:0-无效 1-有效',
            field: 'status',
            component: 'Input',
            required: true,
        },
        {
            label: '创建时间',
            field: 'createTime',
            component: 'Input',
            required: true,
        },
        {
            label: '更新时间',
            field: 'updateTime',
            component: 'Input',
            required: true,
        },
        {
            label: '保留数据0-否 1-是 不允许删除',
            field: 'isPersist',
            component: 'Input',
            required: true,
        },
        {
            label: '是否需要认证: 0-无认证 1-身份认证 默认:1',
            field: 'isAuth',
            component: 'Input',
            required: true,
        },
        {
            label: '是否公开: 0-内部的 1-公开的',
            field: 'isOpen',
            component: 'Input',
            required: true,
        },
        {
            label: '类名',
            field: 'className',
            component: 'Input',
            required: true,
        },
        {
            label: '按钮名称',
            field: 'actionName',
            component: 'Input',
            required: true,
        },
        {
            label: '菜单名称',
            field: 'menuName',
            component: 'Input',
            required: true,
        },
        {
            label: '方法名',
            field: 'methodName',
            component: 'Input',
            required: true,
        },
        {
            label: '请求参数配置',
            field: 'requestParamCfg',
            component: 'Input',
            required: true,
        },
        {
            label: '响应数据配置',
            field: 'responseParamCfg',
            component: 'Input',
            required: true,
        },
        {
            label: '请求参数',
            field: 'requestParam',
            component: 'Input',
            required: true,
        },
        {
            label: '响应参数',
            field: 'responseParam',
            component: 'Input',
            required: true,
        },
];
